package d1203.r2118.num06;

import java.util.Map;
import java.util.TreeMap;

public class Demo01Map {
    public static void main(String[] args) {
        Map<Integer,String> map = new TreeMap();
        //增
        map.put(1,"zhangsan");
        map.put(2,"lisi");
        map.put(3,"wangwu");
        System.out.println(map);
        //删
        map.remove(1,"zhangsan");
        System.out.println(map.remove(1,"zhangsan"));
        System.out.println(map);
        //改
        map.replace(2,"lisi","zhaosi");
        System.out.println(map);
        //cha
        System.out.println(map.get(3));
    }
}
